package edu.tgc.entity.file;

import java.util.Date;
import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import edu.tgc.entity.file.dictionary.FileContractType;
import edu.tgc.entity.system.SysDept;

@Entity
public class FileContract extends FileResource {

    private static final long serialVersionUID = -2567718779716385451L;

    protected Double cost;
    protected SysDept dept;
    protected String description;
    protected Date signedDate;
    protected String sn;
    protected FileContractType type;

    public FileContract() {
    }

    public FileContract(UUID id) {
        super(id);
    }

    @Column(scale = 2)
    public Double getCost() {
        return this.cost;
    }

    @ManyToOne
    public SysDept getDept() {
        return this.dept;
    }

    @Column(length = 512)
    public String getDescription() {
        return this.description;
    }

    @Temporal(value = TemporalType.DATE)
    public Date getSignedDate() {
        return this.signedDate;
    }

    @Column(length = 128)
    public String getSn() {
        return this.sn;
    }

    @ManyToOne
    public FileContractType getType() {
        return this.type;
    }

    public void setCost(Double cost) {
        this.cost = cost;
    }

    public void setDept(SysDept dept) {
        this.dept = dept;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setSignedDate(Date signedDate) {
        this.signedDate = signedDate;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public void setType(FileContractType type) {
        this.type = type;
    }

}
